######################################
####  Misoft () ####
######################################

#...

#       	
	<Files crn_board.php>
		Order Deny,Allow
		Deny from All
	</Files>

# 	
	RewriteEngine on
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d

#  
	<filesmatch .(js|css|jpg|gif|png|ico)$="">
		SetOutputFilter DEFLATE
	</filesmatch>

#    
	RewriteRule \.(jpe?g|bmp|gif|png|css|zip|pdf|txt|doc|swf)$ - [NC,F,L]

#  ,    mosConfig  URL
	RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
	
#  ,   base64_encode  URL
	RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
	
#  ,   srcipt  URL
	RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
	
#  ,      PHP  URL
	RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
	
#  ,   _REQUEST   URL
	RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})

	RewriteCond %{HTTP_USER_AGENT} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
	RewriteCond %{HTTP_USER_AGENT} (;|<|>|'|"|\)|\(|%0A|%0D|%22|%27|%28|%3C|%3E|%00).*(libwww-perl|wget|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
	RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]
	RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [NC,OR]
	RewriteCond %{QUERY_STRING} concat[^\(]*\( [NC,OR]
	RewriteCond %{QUERY_STRING} union([^s]*s)+elect [NC,OR]
	RewriteCond %{QUERY_STRING} union([^a]*a)+ll([^s]*s)+elect [NC,OR]
	RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [NC,OR]

#     404   !
	RewriteRule .* 404.php [F]

#1 YEAR
	<FilesMatch "\.(ico|pdf|flv)$">
		Header set Cache-Control "max-age=29030400, public"
	</FilesMatch>
	
#1 WEEK
	<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
		Header set Cache-Control "max-age=604800, public"
	</FilesMatch>
	
#2 DAYS
	<FilesMatch "\.(xml|txt|css|js)$">
		Header set Cache-Control "max-age=172800, proxy-revalidate"
	</FilesMatch>
	
#1 MIN
	#<FilesMatch "\.(html|htm|php)$">
		#Header set Cache-Control "max-age=60, private, proxy-revalidate"
	#</FilesMatch>

#   
	ErrorDocument 404 /404.php
	

	
# 
RewriteRule ^vkontakte$ index.php?go=vkontakte [L]
RewriteRule ^youtube$ index.php?go=youtube [L]
RewriteRule ^entertainment$ index.php?go=entertainment [L]
	
#    ,   (  )
	RewriteRule ^r=(\d+)$ index.php?r=$1 [L,QSA] ### 
	RewriteRule ^exit$ index.php?go=exit [L] ###
	RewriteRule ^login$ index.php?go=login [L] ###
	RewriteRule ^recovery$ index.php?go=recovery [L] ### 
	RewriteRule ^registration$ index.php?go=registration [L] ###
	RewriteRule ^wmlogin$ index.php?go=wmlogin [L,QSA] ### webmoney
	RewriteRule ^home$ index.php?go=home [L] ###
	RewriteRule ^profile$ index.php?go=profile [L] ###  ( )
	RewriteRule ^mstatistic$ index.php?go=mstatistic [L] ### 
	RewriteRule ^referrals$ index.php?go=referrals [L,QSA] ###
	RewriteRule ^referrals&p=(\d+)$ index.php?go=referrals&page=$1 [L,QSA] ### 
	RewriteRule ^referrals&type=(\d+)$ index.php?go=referrals&type=$1 [L,QSA] ### 
	RewriteRule ^adddyn$ index.php?go=adddyn [L] ### 
	RewriteRule ^mdyn$ index.php?go=mdyn [L] ###  
	RewriteRule ^dynedit=(\d+)$ index.php?go=dynedit&id=$1 [L,QSA] ### 
	RewriteRule ^serfing$ index.php?go=serfing [L] ###
	RewriteRule ^testdrive$ index.php?go=testdrive [L] ###  (test drive)
	RewriteRule ^addcontests$ index.php?go=addcontests [L] ###  
	RewriteRule ^contests$ index.php?go=contests [L] ###  
	RewriteRule ^manager_contests$ index.php?go=manager_contests [L] ###  
	RewriteRule ^contests_result$ index.php?go=contests_result [L] ###   
	RewriteRule ^manager_contests_result$ index.php?go=manager_contests_result [L] ###   
	RewriteRule ^addstatlink$ index.php?go=addstatlink [L] ###  
	RewriteRule ^addautodyn$ index.php?go=addautodyn [L] #  -
	RewriteRule ^mautodyn$ index.php?go=mautodyn [L] # -  
	RewriteRule ^autodynedit=(\d+)$ index.php?go=autodynedit&id=$1 [L,QSA] #  -
	RewriteRule ^auto_serfing$ index.php?go=auto_serfing [L] # -
	RewriteRule ^mstatlink$ index.php?go=mstatlink [L] ###   
	RewriteRule ^statlinkedit=(\d+)$ index.php?go=statlinkedit&id=$1 [L,QSA] ###  
	RewriteRule ^surol=(\d+)$ modules/statlink/view.php?id=$1 [L,QSA] ###  
	RewriteRule ^free-referrals$ index.php?go=free-referrals [L,QSA] ### 
	RewriteRule ^free-referrals&p=(\d+)$ index.php?go=free-referrals&page=$1 [L,QSA] ###  
	RewriteRule ^free-referrals&type=(\d+)$ index.php?go=free-referrals&type=$1 [L,QSA] ###  
	RewriteRule ^addchain$ index.php?go=addchain [L] ###  
	RewriteRule ^mchain$ index.php?go=mchain [L] ###   
	RewriteRule ^chainedit=(\d+)$ index.php?go=chainedit&id=$1 [L,QSA] ###  
	RewriteRule ^chainurl=(\d+)$ modules/advertising-chain/view.php?id=$1 [L,QSA] ###  
	RewriteRule ^basket$ index.php?go=basket [L] ###
	RewriteRule ^basket=ok$ index.php?go=basket&pay=ok [L] ###  
	RewriteRule ^basket=no$ index.php?go=basket&pay=no [L] ###  
	RewriteRule ^addklink$ index.php?go=addklink [L] ###  
	RewriteRule ^mklink$ index.php?go=mklink [L] ###   
	RewriteRule ^klinkedit=(\d+)$ index.php?go=klinkedit&id=$1 [L,QSA] ###  
	RewriteRule ^addtests$ index.php?go=addtests [L] ### 
	RewriteRule ^mtests$ index.php?go=mtests [L] ###  
	RewriteRule ^testsedit=(\d+)$ index.php?go=testsedit&id=$1 [L,QSA] ### 
	RewriteRule ^addban2x3$ index.php?go=addbanner200x300 [L] ###  200  300
	RewriteRule ^mban2x3$ /index.php?go=mbanner200x300 [L] ###   200300
	RewriteRule ^addban468x60$ index.php?go=addbanner468x60 [L] ###  468  60
	RewriteRule ^mban468x60$ /index.php?go=mbanner468x60 [L] ###   46860
	RewriteRule ^msg=inbox$ index.php?go=msg&type=inbox [L] ### 
	RewriteRule ^msg=outbox$ index.php?go=msg&type=outbox [L] ### 
	RewriteRule ^bonus$ index.php?go=bonus [L,QSA] ###
	RewriteRule ^id(\d+)$ index.php?go=wall&id=$1 [L,QSA] ###
	RewriteRule ^id(\d+)&p=(\d+)$ index.php?go=wall&id=$1&page=$2 [L,QSA] ### 
	RewriteRule ^mread=(\d+)$ index.php?go=mread&id=$1 [L,QSA] ###  
	RewriteRule ^mout=(\d+)$ index.php?go=mout&id=$1 [L,QSA] ###  
	RewriteRule ^status$ index.php?go=status [L] ###  
	RewriteRule ^referral_fair$ index.php?go=referral_fair [L,QSA] ###
	RewriteRule ^referral_fair&p=(\d+)$ index.php?go=referral_fair&page=$1 [L,QSA] ### 
	RewriteRule ^referral_fair&type=(\d+)$ index.php?go=referral_fair&type=$1 [L,QSA] ### 
	RewriteRule ^surl=(\d+)$ modules/klink/view.php?id=$1 [L,QSA] ###  
	RewriteRule ^bview=(\d+)$ modules/banner200x300/view.php?id=$1 [L,QSA] ###  200300
	RewriteRule ^b2view=(\d+)$ modules/banner468x60/view.php?id=$1 [L,QSA] ###  46860
	RewriteRule ^tests$ index.php?go=tests [L] ###
	RewriteRule ^testview=(\d+)$ index.php?go=testview&id=$1 [L,QSA] ### 
	RewriteRule ^history=autoserfing$ index.php?go=history&type=autoserfing [L,QSA] ###  -
	RewriteRule ^history=serfing$ index.php?go=history&type=serfing [L,QSA] ###  
	RewriteRule ^history=klink$ index.php?go=history&type=klink [L,QSA] ###   
	RewriteRule ^history=banners$ index.php?go=history&type=banners [L,QSA] ###  
	RewriteRule ^history=tests$ index.php?go=history&type=tests [L,QSA] ###  
	RewriteRule ^history=tasks$ index.php?go=history&type=tasks [L,QSA] ###  
	RewriteRule ^history=pay$ index.php?go=history&type=pay [L,QSA] ###  
	RewriteRule ^history=fair$ index.php?go=history&type=fair [L,QSA] ###  
	RewriteRule ^history=chain$ index.php?go=history&type=chain [L,QSA] ###  
	RewriteRule ^history=statlink$ index.php?go=history&type=statlink [L,QSA] ###   
	RewriteRule ^events$ index.php?go=events [L,QSA] ###
	RewriteRule ^events&p=(\d+)$ index.php?go=events&page=$1 [L,QSA] ### 
	RewriteRule ^history=autoserfing&p=(\d+)$ index.php?go=history&type=autoserfing&page=$1 [L,QSA] ###  - ()
	RewriteRule ^history=serfing&p=(\d+)$ index.php?go=history&type=serfing&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=klink&p=(\d+)$ index.php?go=history&type=klink&page=$1 [L,QSA] ###    ()
	RewriteRule ^history=banners&p=(\d+)$ index.php?go=history&type=banners&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=tests&p=(\d+)$ index.php?go=history&type=tests&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=tasks&p=(\d+)$ index.php?go=history&type=tasks&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=pay&p=(\d+)$ index.php?go=history&type=pay&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=fair&p=(\d+)$ index.php?go=history&type=fair&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=chain&p=(\d+)$ index.php?go=history&type=chain&page=$1 [L,QSA] ###   ()
	RewriteRule ^history=statlink&p=(\d+)$ index.php?go=history&type=statlink&page=$1 [L,QSA] ###    ()
	RewriteRule ^forum$ index.php?go=forum [L] ###
	RewriteRule ^topic(\d+)$ index.php?go=topic&id=$1 [L,QSA] ###
	RewriteRule ^topic(\d+)&p=(\d+)$ index.php?go=topic&id=$1&page=$2 [L,QSA] ### 
	RewriteRule ^posts(\d+)$ index.php?go=posts&id=$1 [L,QSA] ###  ( )
	RewriteRule ^posts(\d+)&p=(\d+)$ index.php?go=posts&id=$1&page=$2 [L,QSA] ### ,  ( )
	RewriteRule ^news$ index.php?go=news [L] ###
	RewriteRule ^news&p=(\d+)$ index.php?go=news&page=$1 [L,QSA] ###  
	RewriteRule ^ref_mailing$ index.php?go=ref_mailing [L] ### 
	RewriteRule ^greeting$ index.php?go=greeting [L] ### 
	RewriteRule ^ref_banners$ index.php?go=ref_banners [L] ### 
	RewriteRule ^catalog$ index.php?go=catalog [L] ### 
	RewriteRule ^catalog=(\d+)$ index.php?go=catalog&id=$1 [L,QSA] ###  
	RewriteRule ^catalog(\d+)&p=(\d+)$ index.php?go=catalog&id=$1&page=$2 [L,QSA] ### ,  ( )
	RewriteRule ^rules$ index.php?go=rules [L] ###
	RewriteRule ^policy$ index.php?go=policy [L] ###
	RewriteRule ^addtasks$ index.php?go=addtasks [L] ### 
	RewriteRule ^mtasks$ index.php?go=mtasks [L] ### 
	RewriteRule ^tasksedit=(\d+)$ index.php?go=tasksedit&id=$1 [L,QSA] ### 
	RewriteRule ^tasks$ index.php?go=tasks [L] ###
	RewriteRule ^tasks&p=(\d+)$ index.php?go=tasks&page=$1 [L,QSA] ### 
	RewriteRule ^tasksview=(\d+)$ index.php?go=tasksview&id=$1 [L,QSA] ### 
	RewriteRule ^tasks_work$ index.php?go=tasks_work [L,QSA] ### 
	RewriteRule ^tasks_work&p=(\d+)$ index.php?go=tasks_work&page=$1 [L,QSA] ###   
	RewriteRule ^tasks_wait$ index.php?go=tasks_wait [L,QSA] ###  
	RewriteRule ^tasks_wait&p=(\d+)$ index.php?go=tasks_wait&page=$1 [L,QSA] ###   
	RewriteRule ^tasksok$ index.php?go=tasksok [L,QSA] ### 
	RewriteRule ^tasksok&p=(\d+)$ index.php?go=tasksok&page=$1 [L,QSA] ###  
	RewriteRule ^selected_tasks$ index.php?go=selected_tasks [L,QSA] ### 
	RewriteRule ^selected_tasks&p=(\d+)$ index.php?go=selected_tasks&page=$1 [L,QSA] ###  
	RewriteRule ^payuser$ index.php?go=payuser [L,QSA] ###   
	RewriteRule ^payments$ index.php?go=payments [L,QSA] ### 
	RewriteRule ^advertising$ index.php?go=advertising [L,QSA] ###  
	RewriteRule ^contacts$ index.php?go=contacts [L] ###
	RewriteRule ^faq$ index.php?go=faq [L] ###
	RewriteRule ^action$ index.php?go=action [L] ###
	RewriteRule ^awards$ index.php?go=awards [L] ###  
	RewriteRule ^wallsreferer$ index.php?go=wallsreferer [L] ### 
	RewriteRule ^competition$ index.php?go=competition [L] ###
	RewriteRule ^end_competition$ index.php?go=end_competition [L] ### 
	RewriteRule ^board$ index.php?go=board [L] ###
	RewriteRule ^archives_board$ index.php?go=archives_board [L] ### 
	RewriteRule ^top=rating$ index.php?go=top&type=rating [L,QSA] ###   
	RewriteRule ^top=earnings$ index.php?go=top&type=earnings [L,QSA] ###   
	RewriteRule ^top=referer$ index.php?go=top&type=referer [L,QSA] ###   
	RewriteRule ^top=serfing$ index.php?go=top&type=serfing [L,QSA] ###   
	RewriteRule ^top=tasks$ index.php?go=top&type=tasks [L,QSA] ###   
	RewriteRule ^chat$ index.php?go=chat [L] ### 
	RewriteRule ^add_tickets$ index.php?go=add_tickets [L] #  
	RewriteRule ^support$ index.php?go=support [L] # 
	RewriteRule ^tickets=(\d+)$ index.php?go=tickets&id=$1 [L,QSA] #  
	RewriteRule ^adv_order=(\d+)$ index.php?go=adv_order&id=$1 [L,QSA] #      

#  
	RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
	RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
	RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
	RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
	RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
	RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
	RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Ezooms [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
	RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
	RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
	RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
	RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
	RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
	RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
	RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
	RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
	RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
	RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
	RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
	RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
	RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
	RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
	RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
	RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
	RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
	RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
	RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
	RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
	RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
	RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
	RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
	RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
	RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
	RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
	RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
	RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
	RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
	RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
	RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
	RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
	RewriteCond %{HTTP_USER_AGENT} ^Zeus [OR]
	RewriteCond %{HTTP_USER_AGENT} ^updown_tester
	
#   404
	RewriteRule .* 404.php [F]